#include <iostream>


int main()
{

    struct Student
    {
        void print()
        {
            std::cout << id << " " << name << std::endl;
        }
        int id;
        char *name;
    };
    
    // 结构体名直接作为类型名
    Student s = {1,"zhangsan"};

    s.print(); //函数也能成为结构体的成员

    return 0;
}